-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
M3-181 로그아웃 및 토큰 리프레시 구현 #26
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- 서버에서 실패해도 클라이언트에서는 성공하게 하였다.
qjvk2880
reviewed
Jul 12, 2024
if (dioException.response?.statusCode == HttpStatus.unauthorized) { | ||
AuthService().logout(); | ||
Get.offAllNamed('/login'); | ||
try { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
해당 부분 하나의 콜백이 너무 길어지는 느낌이 드는데, 한번 더 크게 묶어서 handleAuthorization() 같은 이름의 메소드로 묶는 건 어떨까요?
qjvk2880
approved these changes
Jul 12, 2024
tkdals802
approved these changes
Jul 12, 2024
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
좋은 코드인것 같습니다
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
작업 내용*
고민한 내용*
로그아웃
위 코드 처럼 서버에 로그아웃 요청을 가장 먼저 보낸다. 하지만 서버가 실패하더라도 클라이언트에서는 로그아웃이 진행되도록 구현했다.
토큰 재발급
dio 의 interceptor 를 사용했다.
리뷰 요구사항
스크린샷